import lejos.nxt.LightSensor;
import lejos.nxt.Motor;
import lejos.nxt.SensorPort;
import lejos.nxt.UltrasonicSensor;

/**
 * 
 *  	THIS IS WORK IN PROGRESS!!!
 * 
 */
public class Main {
	
	static int SWING	= 20;
	
	public static void main(String[] args){
		
		UltrasonicSensor ultrasonic = new UltrasonicSensor(Eyes.ULTRASONIC_PORT);
		
		Motor.A.setSpeed(200);
		Motor.C.setSpeed(200);
	
		Eyes eyes = new Eyes(ultrasonic, ultrasonic.getDistance(), SWING);
		
		while(true){
			Motor.A.forward();
			Motor.C.forward();
			
			if(eyes.obstacle())
				eyes.avoidDanger();
		}
	}	
}
